Skip to content

docs: update GET /api/artists to use auth-derived account_id#37

Open
sweetmantech wants to merge 1 commit intomainfrom
sweetmantech/myc-4211-docs-get-apiartists-update-account_id-similar-to-apisandbox
Open

docs: update GET /api/artists to use auth-derived account_id#37
sweetmantech wants to merge 1 commit intomainfrom
sweetmantech/myc-4211-docs-get-apiartists-update-account_id-similar-to-apisandbox

Conversation

@sweetmantech
Copy link
Copy Markdown
Collaborator

@sweetmantech sweetmantech commented Feb 10, 2026

Summary

  • Refactored GET /api/artists docs to match the validateAuthContext + buildGet*Params pattern
  • Renamed accountIdaccount_id and orgIdorganization_id (snake_case)
  • Made account_id optional (derived from auth) and removed personal parameter
  • Added 401 (unauthorized) and 403 (forbidden) response documentation

Test plan

  • Verify OpenAPI spec renders correctly in Mintlify
  • Confirm parameter descriptions match API behavior

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated GET /api/artists endpoint specification with clarified authentication requirements and multi-key behavior guidance.
    • Renamed query parameters for consistency: accountIdaccount_id, orgIdorganization_id, and replaced personal parameter with organization_id.
    • Enhanced error responses with added 401 Unauthorized and 403 Forbidden status codes.
    • Updated parameter descriptions to reflect applicability across different API key types (personal, organization, admin).

Refactor endpoint docs to match the validateAuthContext + buildGet*Params
pattern. Rename params to snake_case, make account_id optional, remove
personal param, and add 401/403 responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

The OpenAPI specification for the GET /api/artists endpoint has been updated to rename query parameters (accountId to account_id, orgId to organization_id), refactor the personal parameter to use UUID filtering instead of boolean logic, expand the endpoint description to clarify authentication requirements and key-type filtering behavior, and add 401 and 403 error response definitions.

Changes

Cohort / File(s) Summary
OpenAPI Specification Update
api-reference/openapi.json
Renamed and refactored query parameters for /api/artists GET endpoint: accountIdaccount_id, orgIdorganization_id, and personal (boolean) → organization_id (UUID). Updated endpoint description to clarify authentication requirements and role-based filtering behavior. Added 401 and 403 error responses; updated 400 response description from missing parameters to invalid parameters.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 Hops through specs with glee,
Parameters renamed, clear as can be,
Authentication shines, errors take flight,
The artists endpoint gleams bright!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the GET /api/artists endpoint documentation to use auth-derived account_id with snake_case naming conventions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sweetmantech/myc-4211-docs-get-apiartists-update-account_id-similar-to-apisandbox

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

"/api/artists": {
"get": {
"description": "Retrieve artists accessible to an account. Supports filtering by organization or showing only personal (non-organization) artists.",
"description": "Retrieve artists accessible to the authenticated account. Requires an API key via x-api-key header or Authorization bearer token.\n\nFor personal API keys: Returns only the key owner's personal artists (not in any organization). The account_id parameter cannot be used.\n\nFor organization API keys: With no filters, returns the key owner's personal artists. Use organization_id to get that organization's artists. Use account_id to filter to a specific member's artists.\n\nFor Recoup admin keys: Same behavior, but account_id can target any account.",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Align the security scheme with the bearer-token wording.

The description says bearer tokens are supported, but this operation doesn’t declare bearerAuth, so generated docs/clients will only show x-api-key. Either add the security block or update the description/401 text to API key only.

🔧 Suggested OpenAPI update
       "get": {
         "description": "Retrieve artists accessible to the authenticated account. Requires an API key via x-api-key header or Authorization bearer token.\n\nFor personal API keys: Returns only the key owner's personal artists (not in any organization). The account_id parameter cannot be used.\n\nFor organization API keys: With no filters, returns the key owner's personal artists. Use organization_id to get that organization's artists. Use account_id to filter to a specific member's artists.\n\nFor Recoup admin keys: Same behavior, but account_id can target any account.",
+        "security": [
+          { "apiKeyAuth": [] },
+          { "bearerAuth": [] }
+        ],
         "parameters": [
           {
             "name": "account_id",
@@
-          "401": {
-            "description": "Unauthorized - invalid or missing API key",
+          "401": {
+            "description": "Unauthorized - invalid or missing credentials",

Also applies to: 480-482

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant